package mvc.view
{
	import flash.events.Event;
	import mx.events.FlexEvent;

	import mvc.view.components.CollView;
	import org.puremvc.as3.patterns.mediator.Mediator;

	public class CollViewMediator extends Mediator
	{
        public static const NAME:String = 'CollViewMediator';
        public function CollViewMediator(viewComponent:Object){super( NAME, viewComponent );}
		override public function onRegister():void
		{
//			collView.message.htmlText = "<b>Hello</b> from the newly registered "+NAME+"	=)";
			collView.addEventListener(FlexEvent.HIDE, onHide);
		}
		protected function onHide(event:Event):void
		{
//			collView.message.text = "Hi there, its your old friend "+NAME+"	=)";
			collView.removeEventListener(FlexEvent.HIDE, onHide);
		}   
        protected function get collView():CollView{return viewComponent as CollView;}
	}
}
